<%@page import="entities.SiteConfig"%>
<%@page import="java.util.TreeMap"%>
<%@page import="helpers.UrlHelper"%>

<%
TreeMap check = (TreeMap) request.getAttribute("check");
SiteConfig configs = (SiteConfig) request.getAttribute("configs");
String form = (String) request.getAttribute("form");
%>

<jsp:include page="/admin/layouts/header.jsp" />

<script type="text/javascript" src="/admin/js/form_config.js"></script>
<script type="text/javascript">
<!--
var charset = "<%=configs.getHttpCharacterSet()%>";
var template = "<%=configs.getTemplate()%>";
jQuery(document).ready(function () {
	jQuery("select[name=httpCharacterSet]").val(charset);
	jQuery("select[name=template]").val(template);
});
//-->
</script>

		<div class="maincontent noright">
        	<div class="maincontentinner">
                <ul class="maintabmenu multipletabmenu">
                	<li class="current"><a href="/admin/config/site/form_site">Site Config</a></li>
                </ul><!--maintabmenu-->
                
                <div class="content">
					<jsp:include page="/admin/elements/message_box.jsp" />
					
                    <div class="contenttitle">
                    	<h2 class="form"><span>Site Config</span></h2>
                    </div><!--contenttitle-->
                    
                    <br>
            
                    <form method="post" action="" class="stdform" id="edit_config_form">
                    	
                        <p>
                        	<label>Site name</label>
                            <span class="field">
                            	<input type="text" class="smallinput" name="siteName" id="c_sitename" value="<%=configs.getSiteName() != null ? configs.getSiteName() : "" %>">
                            	<% if (check.get("siteName") != null) { %>
									<label for="c_sitename" generated="true" class="error"><%=check.get("siteName") %></label>
								<% } %>
                            </span>
                        </p>
                        
                        <p>
                        	<label>Title</label>
                            <span class="field">
                            	<input id="c_title" class="mediuminput" type="text" name="title" value="<%=configs.getTitle() != null ? configs.getTitle() : "" %>" maxlength="100">
                            	 <% if (check.get("title") != null) { %>
									<label for="c_title" generated="true" class="error"><%=check.get("title") %></label>
								<% } %>
                            </span>
                        </p>
                        
                        <p>
                        	<label>META Keywords</label>
                            <span class="field">
                            	<textarea id="c_metaKeywords" class="longinput" name="metaKeywords"  rows="5" cols="80"><%=configs.getMetaKeywords() != null ? configs.getMetaKeywords() : "" %></textarea>
                            	<% if (check.get("metaKeywords") != null) { %>
									<label for="c_metaKeywords" generated="true" class="error"><%=check.get("metaKeywords") %></label>
								<% } %>
                            </span>
                        </p>
                        
                        <p>
                        	<label>META Description</label>
                            <span class="field">
                            	<textarea id="c_metaDescription" class="longinput" name="metaDescription"  rows="5" cols="80"><%=configs.getMetaDescription() != null ? configs.getMetaDescription() : "" %></textarea>
                            	<% if (check.get("metaDescription") != null) { %>
									<label for="c_metaDescription" generated="true" class="error"><%=check.get("metaDescription") %></label>
								<% } %>
                            </span> 
                        </p>
                        
                        <p>
                        	<label>Templates</label>
                            <span class="field">
                            	<select name="template">
                            		<option value="default">Default</option>
                            		<option value="showsite">Showsite</option>
                            	</select>
                            	<% if (check.get("template") != null) { %>
									<label for="c_template" generated="true" class="error"><%=check.get("template") %></label>
								<% } %>
                            </span>
                        </p>
                        
                        <p>
                        	<label>Contact Email</label>
                            <span class="field">
                            	<input type="text" id="c_contactEmail" class="longinput" name="contactEmail" value="<%=configs.getContactEmail() != null ? configs.getContactEmail() : "" %>">
                            	<% if (check.get("contactEmail") != null) { %>
									<label for="c_contactEmail" generated="true" class="error"><%=check.get("contactEmail") %></label>
								<% } %>
                            </span> 
                        </p>
                        
                        <p>
                        	<label>Google Analytic Code</label>
                            <span class="field">
                            	<textarea id="c_googleAnalyticCode" class="longinput" name="googleAnalyticCode"  rows="5" cols="80"><%=configs.getGoogleAnalyticCode() != null ? configs.getGoogleAnalyticCode() : "" %></textarea>
                            	<% if (check.get("googleAnalyticCode") != null) { %>
									<label for="c_googleAnalyticCode" generated="true" class="error"><%=check.get("googleAnalyticCode") %></label>
								<% } %>
                            </span> 
                        </p>
                        
                        <p>
                        	<label>HTTP Character Set</label>
                            <span class="field">
                            	<select id="c_httpCharacterSet" name="httpCharacterSet">
									<option value="ASMO-708" label="Arabic (ASMO 708) - ASMO-708">Arabic (ASMO 708) - ASMO-708</option>
									<option value="DOS-720" label="Arabic (DOS) - DOS-720">Arabic (DOS) - DOS-720</option>
									<option value="iso-8859-6" label="Arabic (ISO) - iso-8859-6">Arabic (ISO) - iso-8859-6</option>
									<option value="x-mac-arabic" label="Arabic (Mac) - x-mac-arabic">Arabic (Mac) - x-mac-arabic</option>
									<option value="windows-1256" label="Arabic (Windows) - windows-1256">Arabic (Windows) - windows-1256</option>
									<option value="ibm775" label="Baltic (DOS) - ibm775">Baltic (DOS) - ibm775</option>
									<option value="iso-8859-4" label="Baltic (ISO) - iso-8859-4">Baltic (ISO) - iso-8859-4</option>
									<option value="windows-1257" label="Baltic (Windows) - windows-1257">Baltic (Windows) - windows-1257</option>
									<option value="ibm852" label="Central European (DOS) - ibm852">Central European (DOS) - ibm852</option>
									<option value="iso" label="Central European (Mac) - x-mac-ce">Central European (Mac) - x-mac-ce</option>
									<option value="windows-1250" label="Central European (Windows) - windows-1250">Central European (Windows) - windows-1250</option>
									<option value="EUC-CN" label="Chinese Simplified (EUC) - EUC-CN">Chinese Simplified (EUC) - EUC-CN</option>
									<option value="gb2312" label="Chinese Simplified (GB2312) - gb2312">Chinese Simplified (GB2312) - gb2312</option>
									<option value="hz-gb-2312" label="Chinese Simplified (HZ) - hz-gb-2312">Chinese Simplified (HZ) - hz-gb-2312</option>
									<option value="x-mac-chinesesimp" label="Chinese Simplified (Mac) - x-mac-chinesesimp">Chinese Simplified (Mac) - x-mac-chinesesimp</option>
									<option value="big5" label="Chinese Traditional (Big5) - big5">Chinese Traditional (Big5) - big5</option>
									<option value="x-Chinese-CNS" label="Chinese Traditional (CNS) - x-Chinese-CNS">Chinese Traditional (CNS) - x-Chinese-CNS</option>
									<option value="x-Chinese-Eten" label="Chinese Traditional (Eten) - x-Chinese-Eten">Chinese Traditional (Eten) - x-Chinese-Eten</option>
									<option value="x-mac-chinesetrad" label="Chinese Traditional (Mac) - x-mac-chinesetrad">Chinese Traditional (Mac) - x-mac-chinesetrad</option>
									<option value="cp866" label="Cyrillic (DOS) - cp866">Cyrillic (DOS) - cp866</option>
									<option value="iso-8859-5" label="Cyrillic (ISO) - iso-8859-5">Cyrillic (ISO) - iso-8859-5</option>
									<option value="koi8-r-8859-2" label="Central European (ISO) - iso-8859-2">Central European (ISO) - iso-8859-2</option>
									<option value="x-mac-ce" label="Cyrillic (KOI8-R) - koi8-r">Cyrillic (KOI8-R) - koi8-r</option>
									<option value="koi8-u" label="Cyrillic (KOI8-U) - koi8-u">Cyrillic (KOI8-U) - koi8-u</option>
									<option value="x-mac-cyrillic" label="Cyrillic (Mac) - x-mac-cyrillic">Cyrillic (Mac) - x-mac-cyrillic</option>
									<option value="windows-1251" label="Cyrillic (Windows) - windows-1251">Cyrillic (Windows) - windows-1251</option>
									<option value="x-Europa" label="Europa - x-Europa">Europa - x-Europa</option>
									<option value="x-IA5-German" label="German (IA5) - x-IA5-German">German (IA5) - x-IA5-German</option>
									<option value="ibm737" label="Greek (DOS) - ibm737">Greek (DOS) - ibm737</option>
									<option value="iso-8859-7" label="Greek (ISO) - iso-8859-7">Greek (ISO) - iso-8859-7</option>
									<option value="x-mac-greek" label="Greek (Mac) - x-mac-greek">Greek (Mac) - x-mac-greek</option>
									<option value="windows-1253" label="Greek (Windows) - windows-1253">Greek (Windows) - windows-1253</option>
									<option value="ibm869" label="Greek, Modern (DOS) - ibm869">Greek, Modern (DOS) - ibm869</option>
									<option value="DOS-862" label="Hebrew (DOS) - DOS-862">Hebrew (DOS) - DOS-862</option>
									<option value="iso-8859-8-i" label="Hebrew (ISO-Logical) - iso-8859-8-i">Hebrew (ISO-Logical) - iso-8859-8-i</option>
									<option value="iso-8859-8" label="Hebrew (ISO-Visual) - iso-8859-8">Hebrew (ISO-Visual) - iso-8859-8</option>
									<option value="x-mac-hebrew" label="Hebrew (Mac) - x-mac-hebrew">Hebrew (Mac) - x-mac-hebrew</option>
									<option value="windows-1255" label="Hebrew (Windows) - windows-1255">Hebrew (Windows) - windows-1255</option>
									<option value="ibm861" label="Icelandic (DOS) - ibm861">Icelandic (DOS) - ibm861</option>
									<option value="x-mac-icelandic" label="Icelandic (Mac) - x-mac-icelandic">Icelandic (Mac) - x-mac-icelandic</option>
									<option value="x-iscii-as" label="ISCII Assamese - x-iscii-as">ISCII Assamese - x-iscii-as</option>
									<option value="x-iscii-be" label="ISCII Bengali - x-iscii-be">ISCII Bengali - x-iscii-be</option>
									<option value="x-iscii-de" label="ISCII Devanagari - x-iscii-de">ISCII Devanagari - x-iscii-de</option>
									<option value="x-iscii-gu" label="ISCII Gujarathi - x-iscii-gu">ISCII Gujarathi - x-iscii-gu</option>
									<option value="x-iscii-ka" label="ISCII Kannada - x-iscii-ka">ISCII Kannada - x-iscii-ka</option>
									<option value="x-iscii-ma" label="ISCII Malayalam - x-iscii-ma">ISCII Malayalam - x-iscii-ma</option>
									<option value="x-iscii-or" label="ISCII Oriya - x-iscii-or">ISCII Oriya - x-iscii-or</option>
									<option value="x-iscii-pa" label="ISCII Panjabi - x-iscii-pa">ISCII Panjabi - x-iscii-pa</option>
									<option value="x-iscii-ta" label="ISCII Tamil - x-iscii-ta">ISCII Tamil - x-iscii-ta</option>
									<option value="x-iscii-te" label="ISCII Telugu - x-iscii-te">ISCII Telugu - x-iscii-te</option>
									<option value="euc-jp" label="Japanese (EUC) - euc-jp">Japanese (EUC) - euc-jp</option>
									<option value="iso-2022-jp" label="Japanese (JIS) - iso-2022-jp">Japanese (JIS) - iso-2022-jp</option>
									<option value="csISO2022JP" label="Japanese (JIS-Allow 1 byte Kana) - csISO2022JP">Japanese (JIS-Allow 1 byte Kana) - csISO2022JP</option>
									<option value="x-mac-japanese" label="Japanese (Mac) - x-mac-japanese">Japanese (Mac) - x-mac-japanese</option>
									<option value="shift_jis" label="Japanese (Shift-JIS) - shift_jis">Japanese (Shift-JIS) - shift_jis</option>
									<option value="ks_c_5601-1987" label="Korean - ks_c_5601-1987">Korean - ks_c_5601-1987</option>
									<option value="euc-kr" label="Korean (EUC) - euc-kr">Korean (EUC) - euc-kr</option>
									<option value="iso-2022-kr" label="Korean (ISO) - iso-2022-kr">Korean (ISO) - iso-2022-kr</option>
									<option value="Johab" label="Korean (Johab) - Johab">Korean (Johab) - Johab</option>
									<option value="x-mac-korean" label="Korean (Mac) - x-mac-korean">Korean (Mac) - x-mac-korean</option>
									<option value="iso-8859-3" label="Latin 3 (ISO) - iso-8859-3">Latin 3 (ISO) - iso-8859-3</option>
									<option value="iso-8859-15" label="Latin 9 (ISO) - iso-8859-15">Latin 9 (ISO) - iso-8859-15</option>
									<option value="x-IA5-Norwegian" label="Norwegian (IA5) - x-IA5-Norwegian">Norwegian (IA5) - x-IA5-Norwegian</option>
									<option value="IBM437" label="OEM United States - IBM437">OEM United States - IBM437</option>
									<option value="x-IA5-Swedish" label="Swedish (IA5) - x-IA5-Swedish">Swedish (IA5) - x-IA5-Swedish</option>
									<option value="windows-874" label="Thai (Windows) - windows-874">Thai (Windows) - windows-874</option>
									<option value="ibm857" label="Turkish (DOS) - ibm857">Turkish (DOS) - ibm857</option>
									<option value="iso-8859-9" label="Turkish (ISO) - iso-8859-9">Turkish (ISO) - iso-8859-9</option>
									<option value="x-mac-turkish" label="Turkish (Mac) - x-mac-turkish">Turkish (Mac) - x-mac-turkish</option>
									<option value="windows-1254" label="Turkish (Windows) - windows-1254">Turkish (Windows) - windows-1254</option>
									<option value="unicode" label="Unicode - unicode">Unicode - unicode</option>
									<option value="unicodeFFFE" label="Unicode (Big-Endian) - unicodeFFFE">Unicode (Big-Endian) - unicodeFFFE</option>
									<option value="utf-7" label="Unicode (UTF-7) - utf-7">Unicode (UTF-7) - utf-7</option>
									<option value="utf-8" label="Unicode (UTF-8) - utf-8">Unicode (UTF-8) - utf-8</option>
									<option value="us-ascii" label="US-ASCII - us-ascii">US-ASCII - us-ascii</option>
									<option value="windows-1258" label="Vietnamese (Windows) - windows-1258">Vietnamese (Windows) - windows-1258</option>
									<option value="ibm850" label="Western European (DOS) - ibm850">Western European (DOS) - ibm850</option>
									<option value="x-IA5" label="Western European (IA5) - x-IA5">Western European (IA5) - x-IA5</option>
									<option value="iso-8859-1" label="Western European (ISO) - iso-8859-1">Western European (ISO) - iso-8859-1</option>
									<option value="macintosh" label="Western European (Mac) - macintosh">Western European (Mac) - macintosh</option>
									<option value="Windows-1252" label="Western European (Windows) - Windows-1252">Western European (Windows) - Windows-1252</option>
								</select>
                            </span>
                            <small class="desc">Documents transmitted with HTTP that are of type text, such as text/html, text/plain, etc., can send a charset parameter in the HTTP header to specify the character encoding of the document.</small>
                        </p>
                        
                        <p>
                        	<label>Logo Url</label>
                            <span class="field">
                            	<input type="text" id="c_logo" class="longinput" name="logo" value="<%=configs.getLogo() != null ? configs.getLogo() : "" %>">
                            	<% if (check.get("logo") != null) { %>
									<label for="c_logo" generated="true" class="error"><%=check.get("logo") %></label>
								<% } %>
                            </span> 
                        </p>
                        
                        <br clear="all">
                        
                        <p class="stdformbutton">
                        	<button class="submit radius2">Submit Button</button>
                            <input type="reset" value="Reset Button" class="reset radius2">
                        </p>
                        
                    </form>
                    
                    <br clear="all">
                    
                </div><!--content-->
                
            </div><!--maincontentinner-->
            
            <jsp:include page="/admin/elements/copyright.jsp" />
            
        </div>

<jsp:include page="/admin/layouts/footer.jsp" />